package calc.buttonPanel;

import java.awt.Font;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;
import javax.swing.JButton;
import javax.swing.JPanel;

import calc.CalFrame;

public class NumPanel extends JPanel {
	
	
	private CalcButton[] numButton;
	

	public NumPanel() {
		
		
		numButton = new CalcButton[11];
		for (int i = 0; i < 10; i++) {
			numButton[i] = new CalcButton(String.valueOf(i));		
		}
		
		numButton[10] = new CalcButton(".");
		
				
		setLayout(null);
		
		numButton[7].setBounds(0, 0, 50, 50);
		numButton[8].setBounds(55, 0, 50, 50);
		numButton[9].setBounds(110, 0, 50, 50);
		
		numButton[4].setBounds(0, 55, 50, 50);
		numButton[5].setBounds(55, 55, 50, 50);
		numButton[6].setBounds(110, 55, 50, 50);
		
		numButton[1].setBounds(0, 110, 50, 50);
		numButton[2].setBounds(55, 110, 50, 50);
		numButton[3].setBounds(110, 110, 50, 50);
		
		numButton[0].setBounds(0, 165, 105, 50);
		numButton[10].setBounds(110, 165, 50, 50);
		
		for(int i = 0 ; i < 11 ; i++) {
			add(numButton[i]);
		}

	}


	public CalcButton[] getNumButton() {
		return numButton;
	}


	public void setNumButton(CalcButton[] numButton) {
		this.numButton = numButton;
	}
	
	
	
}
